package com.atguigu.spzx.service.product.controller;

import com.atguigu.spzx.service.product.service.IndexService;
import com.atguigu.spzx.model.common.Result;
import com.atguigu.spzx.model.vo.h5.IndexVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * title:
 * author: zgl
 * date: 2024/1/15
 * description：
 */
@RestController
@RequestMapping("/api/product/index")
//@CrossOrigin
@Tag(name = "首页模块")
public class IndexController {
    @Autowired
    private IndexService indexService;
    @Operation(summary = "查询首页信息接口")
    @GetMapping
    public Result getIndexData(){
        IndexVo indexVo = indexService.getIndexData();
        return Result.ok(indexVo);
    }
}
